import request from '@/utils/request'
import type { loginData, loginResponseData, infoDate } from './model/login'
enum API {
    LOGINURL = '/admin/acl/index/login',
    INFO = '/admin/acl/index/info',
    LOGOUT='/admin/acl/index/logout'
}
// 登录获取token
export const reqLogin = (data: loginData) => request.post<any, loginResponseData>(API.LOGINURL, data)

// 用户信息
export const reqInfo = () => request.get<any, infoDate>(API.INFO)

// 退出登录
export const reqLogout = () => request.post(API.LOGOUT)